package com.hyt.model.cloudefile.enums;

import org.apache.commons.lang3.StringUtils;

import lombok.Getter;

/**
 * 系统枚举
 * @author huangwu
 */
@Getter
public enum SystemEnum {

	PT("11", "平台服务"),
	UA("12", "权限服务"),
	
	
	LOG("21", "日志服务"),
	CJ("22", "采集服务"),
	TPS("23", "第三方服务"),
	
	
    BM("31", "报名服务"),
    TK("32", "题库服务"),
    
    KW("41", "考务服务"),
    KS("42", "考试服务"),
    KWGOV("43", "政企考务服务"),
    
    
    PJ("51", "评卷服务"),
    YKCJ("52", "成绩服务"),
    
    KWDATA("61", "考务数据服务"),
	PJDATA("62", "评卷数据服务"),
    
    ;
    /**
     * 系统类型
     */
    private final String systemType;
    /**
     * 描述信息
     */
    private final String systemDesc;
    
	private SystemEnum(String systemType, String systemDesc) {
		this.systemType = systemType;
		this.systemDesc = systemDesc;
	}
	
	
	public static SystemEnum getSystemEnumByType(String type) {
		if(StringUtils.isEmpty(type)) {
			return null;
		}
		for (SystemEnum systemEnum : SystemEnum.values()) {
			if(systemEnum.getSystemType().equals(type)) {
				return systemEnum;
			}
		}
		return null;
	}
}
